home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 68.7z / BS1 part 68 / Type Smith v2.0 (1993)(Relog)[h SR][WB].7z / Type Smith v2.0 (1993)(Relog)[h SR][WB].adf / REXX.lha / Rexx / ConvertCGtoPS.tsrx < prev    next >
Text File  |  1993-11-09  |  1KB  |  53 lines

  1. /* ConvertCGtoPS.tsrx */
  2. /* Copyright 1993 Soft-Logik Publishing Corporation */
  3. /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
  4. /* $VER: 1.0 */
  5.  
  6. /* Purpose: Convert Compugraphic Intellifont to PostScript Type 1 font */
  7.  
  8. /*TRACE ?i*/
  9.  
  10. ADDRESS 'TYPESMITH'
  11. OPTIONS RESULTS
  12.  
  13. /* Get the Intellifont filename to convert */
  14. get_file 'Select a Compugraphic font...|Ok|Fonts:_Bullet_Outlines|'
  15. IF RC=5 THEN DO
  16.     display_alert 'No file selected!|Exit'
  17.     EXIT
  18. END
  19.  
  20. /* Import the Intellifont */
  21. InFile=Result
  22. import_if InFile
  23.  
  24. /* Get the export path */
  25. get_string 'Enter the PostScript path, if desired.|Ok|Same path'
  26. OutPath=Result
  27. PathLength=LASTPOS(InFile,'/')
  28. IF RC=5 THEN DO
  29.     /* Cut out the path portion of the InFile string */
  30.     OutPath=LEFT(InFile,PathLength)
  31. END
  32.  
  33. /* Create the new font name and output path */
  34. FontEnd=LASTPOS(InFile,'.')
  35. IF FontEnd=0 THEN FontEnd=LENGTH(InFile)
  36. OutPFB=SUBSTR(InFile,PathLength,FontEnd)||'.PFB'
  37. OutAFM=SUBSTR(InFile,PathLength,FontEnd)||'.AFM'
  38.  
  39. /* Export the font in PostScript format */
  40. export_pfb OutPath||OutPFB
  41. IF RC>0 THEN DO
  42.     display_alert 'Export PFB failed.|Exit'
  43.     EXIT
  44. END
  45. export_afm OutPath||OutAFM
  46. IF RC>0 THEN DO
  47.     display_alert 'Export AFM failed.|Exit'
  48.     EXIT
  49. END
  50.  
  51. /* Tell the user we're done */
  52. display_alert 'Font conversion successful!|Great!'
  53.